﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_Task_DeleteSubscription]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_Task_DeleteSubscription];
GO
CREATE PROCEDURE [dbo].[sproc_Task_DeleteSubscription]
    @Username nvarchar(300),
    @TaskID nvarchar(400)
    
AS

declare @SQL nvarchar(4000)

SET @SQL ="DELETE FROM  uds_task_subscription where  Username='"+@Username+"' and TaskID in (" +@TaskID+ ") "
print @SQL
    EXEC (@SQL)